package com.atom.testdb

import android.app.Application
import android.util.Log
import com.atom.dbflow.DBFlowContext
import com.raizlabs.android.dbflow.config.DBFlowDatabaseGeneratedDatabaseHolder
import com.raizlabs.android.dbflow.config.DBFlowOtherDatabaseGeneratedDatabaseHolder
import com.raizlabs.android.dbflow.config.FlowConfig
import com.raizlabs.android.dbflow.config.FlowManager
import com.saop.core.SAOP
import com.saop.core.api.InterceptHandler
import org.aspectj.lang.JoinPoint

class App : Application() {

    override fun onCreate() {
        super.onCreate()
        SAOP.init(this , true)
        SAOP.setInterceptHandler(object : InterceptHandler {
            override fun intercept(type: Int, joinPoint: JoinPoint?): Boolean {
                when (type){
                    1 -> {
                        Log.e("App" , "看我给你拦截下来")
                        return true
                    }
                }
                return false
            }
        })
        val packageName = applicationInfo.packageName
        Log.e("App" , packageName)
    }
}